<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>分页界面</title>
    <link rel="stylesheet" type="text/css" href="${s.base}/lib/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/index.css"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/theme/theme.css"/>
</head>
<body>
<div class="wrap-container clearfix">
    <div class="column-content-detail">
        <form class="layui-form" method="post">
            <div class="search-cont clearfix" id="tool">
                <div class="operation-btn-cont">
                    <div class="operright cyt-retract-close hideMenu">收起筛选<i class="iconfont">&#xe658;</i></div>
                    <div class="operright cyt-retract-open showMenu" style="display: none;">展开筛选<i class="iconfont">&#xe936;</i></div>
                    <div class="triangle-bottom"></div>
                    <div class="triangle-top"></div>
                </div>
                <div class="search-details">
                    <div class="layui-form-item marb5">
                        <div class="layui-inline">
                            <label class="layui-form-label w75">应用名称：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="applyName" id="applyName" placeholder="请输入应用名称" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label w75">会员昵称：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="nickName" id="nickName" placeholder="请输入会员昵称" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline marl8">
                            <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="seacherBtn">搜索</button>
                            <button class="layui-btn layui-btn-normal" type="reset">重置</button>
                        </div>
                    </div>
                </div>
            </div>
        </form>
        <div class="layui-form" id="table-list">
            <table id="entityList" lay-filter="entityList" class="cy-list-table"></table>
        </div>
    </div>
</div>
<script src="${s.base}/lib/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="${s.base}/js/common.js" type="text/javascript" charset="utf-8"></script>
<script>
    layui.use(['jquery', 'table', 'page', 'layer', 'baseutil'], function () {
        var $ = layui.jquery,
            page = layui.page,
            layer = layui.layer,
            table = layui.table,
            baseutil = layui.baseutil;

        //获取分页数据
        page.initDict('base_status', function (dictData) {
            page.showDict($("#status"), page.aceeptDictContentList(dictData, "base_status"), "请选择状态");
            var url = "/wx/wxmember/pageUser";
            var cols = [
                {type: 'checkbox', fixed: 'left'},
                {field: 'applyName', title: '应用名称', align: 'center'},
                {field: 'nickName', title: '会员昵称', align: 'center'},
                {
                    field: 'headLogo', title: '会员头像', align: 'center', width: 100, templet: function (d) {
                        return "<img lay-event='show' src='" + d.headLogo + "' style='width: 30px;height: 30px;'/>";
                    }
                },
                {field: 'openid', title: '微信id', align: 'center'},
                {
                    field: 'createTime', title: '创建时间', align: 'center', width: 190, templet: function (d) {
                        return new Date(d.createTime).Format("yyyy-MM-dd hh:mm:ss");
                    }
                }
            ];
            page.initDate(cols, url);
        });

        //监听行工具事件
        table.on('tool(entityList)', function (obj) {
            var layEvent = obj.event,
                data = obj.data;
            if (layEvent === 'show') {
                layer.photos({
                    photos: {
                        "title": '',
                        "id": baseutil.acceptRandom(1),
                        "start": 0,
                        "data": [{
                            "alt": "",
                            "pid": 1,
                            "src": data.headLogo,
                            "thumb": ""
                        }]
                    },
                    shift: 5
                });
            }
        });
    });
</script>
</body>
</html>